3.387 \(\int \sqrt{\frac{-a+b x^2}{x^2}} \, dx\)

Optimal. Leaf size=43 \[ x \sqrt{b-\frac{a}{x^2}}+\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{b-\frac{a}{x^2}}}\right ) \]

[Out]

Sqrt[b - a/x^2]*x + Sqrt[a]*ArcTan[Sqrt[a]/(Sqrt[b - a/x^2]*x)]

_______________________________________________________________________________________

Rubi [A]  time = 0.0625333, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 17, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.294 \[ x \sqrt{b-\frac{a}{x^2}}+\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{x \sqrt{b-\frac{a}{x^2}}}\right ) \]

Antiderivative was successfully verified.

[In]  Int[Sqrt[(-a + b*x^2)/x^2],x]

[Out]

Sqrt[b - a/x^2]*x + Sqrt[a]*ArcTan[Sqrt[a]/(Sqrt[b - a/x^2]*x)]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 5.09326, size = 34, normalized size = 0.79 \[ \sqrt{a} \operatorname{atan}{\left (\frac{\sqrt{a}}{x \sqrt{- \frac{a}{x^{2}} + b}} \right )} + x \sqrt{- \frac{a}{x^{2}} + b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(((b*x**2-a)/x**2)**(1/2),x)

[Out]

sqrt(a)*atan(sqrt(a)/(x*sqrt(-a/x**2 + b))) + x*sqrt(-a/x**2 + b)

_______________________________________________________________________________________

Mathematica [A]  time = 0.067733, size = 67, normalized size = 1.56 \[ \frac{x \sqrt{b-\frac{a}{x^2}} \left (\sqrt{b x^2-a}+\sqrt{a} \tan ^{-1}\left (\frac{\sqrt{a}}{\sqrt{b x^2-a}}\right )\right )}{\sqrt{b x^2-a}} \]

Antiderivative was successfully verified.

[In]  Integrate[Sqrt[(-a + b*x^2)/x^2],x]

[Out]

(Sqrt[b - a/x^2]*x*(Sqrt[-a + b*x^2] + Sqrt[a]*ArcTan[Sqrt[a]/Sqrt[-a + b*x^2]])
)/Sqrt[-a + b*x^2]

_______________________________________________________________________________________

Maple [B]  time = 0.011, size = 81, normalized size = 1.9 \[{x\sqrt{{\frac{b{x}^{2}-a}{{x}^{2}}}} \left ( \sqrt{-a}\sqrt{b{x}^{2}-a}+a\ln \left ( 2\,{\frac{\sqrt{-a}\sqrt{b{x}^{2}-a}-a}{x}} \right ) \right ){\frac{1}{\sqrt{-a}}}{\frac{1}{\sqrt{b{x}^{2}-a}}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(((b*x^2-a)/x^2)^(1/2),x)

[Out]

((b*x^2-a)/x^2)^(1/2)*x*((-a)^(1/2)*(b*x^2-a)^(1/2)+a*ln(2*((-a)^(1/2)*(b*x^2-a)
^(1/2)-a)/x))/(-a)^(1/2)/(b*x^2-a)^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt((b*x^2 - a)/x^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.243506, size = 1, normalized size = 0.02 \[ \left [x \sqrt{\frac{b x^{2} - a}{x^{2}}} + \frac{1}{2} \, \sqrt{-a} \log \left (-\frac{b x^{2} - 2 \, \sqrt{-a} x \sqrt{\frac{b x^{2} - a}{x^{2}}} - 2 \, a}{x^{2}}\right ), x \sqrt{\frac{b x^{2} - a}{x^{2}}} + \sqrt{a} \arctan \left (\frac{\sqrt{a}}{x \sqrt{\frac{b x^{2} - a}{x^{2}}}}\right )\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt((b*x^2 - a)/x^2),x, algorithm="fricas")

[Out]

[x*sqrt((b*x^2 - a)/x^2) + 1/2*sqrt(-a)*log(-(b*x^2 - 2*sqrt(-a)*x*sqrt((b*x^2 -
 a)/x^2) - 2*a)/x^2), x*sqrt((b*x^2 - a)/x^2) + sqrt(a)*arctan(sqrt(a)/(x*sqrt((
b*x^2 - a)/x^2)))]

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(((b*x**2-a)/x**2)**(1/2),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.221326, size = 86, normalized size = 2. \[ -{\left (\sqrt{a} \arctan \left (\frac{\sqrt{b x^{2} - a}}{\sqrt{a}}\right ) - \sqrt{b x^{2} - a}\right )}{\rm sign}\left (x\right ) +{\left (\sqrt{a} \arctan \left (\frac{\sqrt{-a}}{\sqrt{a}}\right ) - \sqrt{-a}\right )}{\rm sign}\left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(sqrt((b*x^2 - a)/x^2),x, algorithm="giac")

[Out]

-(sqrt(a)*arctan(sqrt(b*x^2 - a)/sqrt(a)) - sqrt(b*x^2 - a))*sign(x) + (sqrt(a)*
arctan(sqrt(-a)/sqrt(a)) - sqrt(-a))*sign(x)